package cn.bdqn.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.bdqn.pojo.SalaryStand;
import cn.bdqn.service.SalaryStandService;

@Controller
@RequestMapping("")
public class SalaryStandController {
	@Resource
	public SalaryStandService  Sss;
	
	 //修改薪酬标准信息
    @RequestMapping("modify")
    public String modify(SalaryStand sd){
        int flag = Sss.modifySalary(sd);
        if(flag == 1) {
            return "redirect:/SalaryStand/findSalary";
        }else {
            return "redirect:/SalaryStand/modifySalary";
        }
    }
    //删除薪酬标准信息
    @RequestMapping("delSalary")
    @ResponseBody
    public String delPost(@RequestParam Integer salaryStandId){
        int flag = Sss.delSalary(salaryStandId);
        if(flag == 1) {
            return "true";
        }else {
            return "false";
        }
    }

	
	@RequestMapping("")
	public String getfind(Model model,SalaryStand Sas) {
	  
	 
	  return null;
	}
}
